package com.asset.salesforce.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.asset.salesforce.domain.Calendar;
import com.asset.salesforce.service.CalendarService;

@Controller
public class TestCalendarByEmployee {
	@Autowired
	private CalendarService calendarService;
	@RequestMapping(value="/allCalendars",method=RequestMethod.GET)
	public String loadCalendar(Model model,HttpSession session,HttpServletRequest request) {
		List<Calendar> calenders = calendarService.getAllEventsByEmplyoeeID(1);
		model.addAttribute("calendars", calenders);
		return "allCalendars";
	}

}
